<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="node_modules/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
    <div @click="clickMe('div')" style="border: green 1px solid;width: 100px;height: 100px;">
        <button @click.stop="clickMe('btn')" @contextmenu.prevent="rightClick('哈哈哈')">点我试试</button>
    </div>

</div>
<script>
   var  dataobj={
       name:"柯震南",
           num:0
   }



    var vm = new Vue({
        el:"#app",
       data:dataobj,
        methods:{
            decrement(){
                this.num--;
            },
            clickMe(val){
                console.log("hello,"+val);
            },
            rightClick(msg){
                alert(msg);
            }
        }



    })

</script>


</body>
</html>